package com.hw8.mongoDao;

import com.hw8.mongo.MongoDbDao;
import com.hw8.mongobean.User;
import org.springframework.stereotype.Repository;

@Repository
public class UserMongoDao extends MongoDbDao<User> {
    @Override
    protected Class<User> getEntityClass() {
        return User.class;
    }

    public User queryByUserId(Long userId){
        User user =  new User();
        user.setUid(userId);
        return this.queryOne(user);
    }
}
